

import 'package:flutter/material.dart';

class TemLegend extends StatelessWidget {
  const TemLegend({super.key});


  List<Widget> getTemTitles(){

    List<Widget> items = [];

    for(int i=0;i<6;i++){

      items.add(Text(
        "${i*40}℃",
        style: TextStyle(color: Color(0xFF333333), fontSize: 10),
      ));

    }
    return items;

  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(children: [
        Container(height: 5, decoration: BoxDecoration(
            gradient: LinearGradient(
              colors: [Colors.blue, Colors.red],
            ))),
        Container(child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: getTemTitles(),
        ),)
      ],),
    );
  }
}
